home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4207 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: inforamp.net!ts44-07
  2. From: rmorin@inforamp.net (Randy Charles Morin)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: finding a bug.. any suggestions ?
  5. Date: Fri, 02 Feb 96 18:05:47 GMT
  6. Organization: MiddleWorld SoftWare
  7. Message-ID: <4etjft$7s1@sam.inforamp.net>
  8. References: <823166642snz@willen.demon.co.uk>
  9. NNTP-Posting-Host: ts44-07.tor.inforamp.net
  10. X-Newsreader: News Xpress Version 1.0 Beta #4
  11.  
  12. In article <823166642snz@willen.demon.co.uk>,
  13.    Adrian Parker <adrian@willen.demon.co.uk> wrote:
  14. >
  15. >Using Watcom 10.0a..  
  16. >Creating a win3x DLL incorporating Watcom ODBC (wsql40 patch to level C)
  17. >Calling the DLL from PowerBuilder 4.0
  18. >
  19. >What happens is that in the first call to the DLL to perform an operation
  20. >the whole thing works fine.  But the second time, doing exactly the same
  21. >operation it GPFs in an apparently innocuous place.  Also, when I quit
  22. >windows after the GPF, it hangs.  So I'm assuming some part of windows
  23. >is being corrupted too.
  24. >
  25. >I've checked everything I can think of..  
  26. >    all the malloc/free statements balance.
  27. >    all the variables I assign data to with strcpy etc are large eough.
  28. >    all the pointers I use are correctly set up.
  29. >
  30. >The only thing I can think of that might catch this bug is some kind of
  31. >memory leak detector.. anyone have any suggestions as to what I could use ?
  32. >
  33. >Hopefully,
  34. >Adrian
  35.  
  36. I had the same problem.
  37. What I did was clean up my ODBC opens and closes and everything stabilized.
  38. By cleaning up, I mean I made certain that I responded to all ODBC errors and 
  39. took the proper precautions when an error occured.  I never used ODBC 
  40. resources more than once.  I would close every HSTMT after only one useage.
  41.  
  42. Agrivar
  43.